<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象深拷贝2</title>
</head>
<body>
<script>
   //扩展运算符ES6,eeee,也是一个浅拷贝
    var obj={
        name:"hzghds",
        sex:[25,52],
        old:"jsahd"
    }
    var {...obj2}=obj;
    obj.sex[1]="jdc";
    console.log(obj,obj2);
</script>
</body>
</html>